package com.cxytiandi.encrypt.util;

import org.apache.commons.io.FileUtils;

import java.io.File;
import java.io.IOException;



public class App {

    public static void main(String[] args) throws IOException {
        File file1 = new File("H:\\study\\monkey-api-encrypt\\monkey-api-encrypt-core\\src\\main\\java\\com\\cxytiandi\\encrypt\\util\\dtext.txt");
        String d_content = FileUtils.readFileToString(file1);
        System.out.println(System.currentTimeMillis());
        byte[] decrypt = AesEncryptUtils.decrypt(d_content.getBytes(), "d86d7bab3d6ac01ad9dc6a897652f2d2".getBytes());
        System.out.println(System.currentTimeMillis());
        System.out.println(decrypt.toString());
//        UserDto userDto = new UserDto();
//        userDto.setId(1);
//        userDto.setName("刘文鹏");
        //读取test.txt文件 获取内容
        File file = new File("H:\\study\\monkey-api-encrypt\\monkey-api-encrypt-core\\src\\main\\java\\com\\cxytiandi\\encrypt\\util\\test.txt");
        String content =FileUtils.readFileToString(file);
        System.out.println(System.currentTimeMillis());
        byte[] decrypt1 = AesEncryptUtils.encrypt(content.getBytes(), "d86d7bab3d6ac01ad9dc6a897652f2d2".getBytes());
        System.out.println(System.currentTimeMillis());
        System.out.println(decrypt1.toString());
    }
}
